# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
image: python:3.10

stages:
  - lint
  - test

black_formatting:
  stage: lint
  script:
    - python3 -m pip install black
    # Verify the Python code is black formatting compliant.
    - black . --check --exclude '\.git/'
  allow_failure: false

ruff:
  stage: lint
  script:
    - python3 -m pip install ruff
    - ruff .

pytest:
  stage: test
  script:
    - python3 -m pip install -r ci_cd_testing_requirements.txt
    - python -m pytest .
